package cn.gene.timeyan.privateletter.service;


import cn.gene.timeyan.pojo.PrivateLetter.NoticeMessage;
import cn.gene.timeyan.pojo.PrivateLetter.PrivateLetter;
import cn.gene.timeyan.pojo.ums.vo.UserInfoVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

//

public interface PrivateLetterService {

    @Transactional
/**
 * 增加私信 返回受影响行数
 */
    int addPrivateLetter(Long senderId, Long receiverId, String content);

    /**
     * 新增公告
     * @param
     * @return
     */
    int addNoticeMessageService(String title, String content );


    int addMessageNotification(Long receiverId , String title, String content);
    /**
     * 删除私信 返回受影响行数
     * @param privateLetterId
     * @return
     */
    int deleteById(Long privateLetterId);

//    List<PrivateLetterSenderIdVo> getSenderByReceiverId(Long receiverId );

    /**
     * 查询谁给你发的私信
     * @param receiverId
     * @return 发送id
     */
    List<UserInfoVo> getSender(Long receiverId);


    /**
     * 获取历史聊天记录
     * @param receiverId
     * @param SenderId
     * @return
     */
     List<PrivateLetter> getContent (Long receiverId, Long SenderId);



    //    <!--    List<NoticeMessage> getAllNoticeMessage();-->

    /**
     * 获取全部公告
     * @return 全部公告
     */
    List<NoticeMessage> getAllNoticeMessageService();


    /**
     * 获取通知
     * @param receiverId 接收者id
     * @return
     */
    List<NoticeMessage> getAllMessageNotificationServiceByReceiverId(Long receiverId);




}


